package com.app.controller;

import com.app.common.Result;
import com.app.model.AdminUserModel;
import com.app.model.CategoryModel;
import com.app.server.*;
import com.app.vo.CountVo;
import com.app.vo.RescueTaskXyVo;
import com.app.vo.XyVo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * 统计数量
 */
@Slf4j
@RestController
@RequestMapping("/sbbz/count")
public class CountNumberController {
    //统计数量
    @Autowired
    private CountNumberService countNumberService;
    //分类
    @Autowired
    private CategoryService categoryService;

    //统计数量
    @GetMapping("/getCountAll")
    public Result<Object> getCountAll() {
        CountVo countAll = countNumberService.getCountAll();
        return Result.success(countAll);
    }

    //救援任务统计
    @GetMapping("/getRescueTaskCount")
    public Result<Object> getRescueTaskCount() {
        RescueTaskXyVo rescueTaskVo =countNumberService.getRescueTaskCount();
        return Result.success(rescueTaskVo);
    }

    //野生动物保护统计
    @GetMapping("/getAnimalProtectCount")
    public Result<Object> getAnimalProtectCount() {
        XyVo animalProtectCount = countNumberService.getAnimalProtectCount();

        return Result.success(animalProtectCount);
    }
}
